module.exports = {
  optimization: {
    chunkIds: "named",
    runtimeChunk: 'single',
    splitChunks: {
      chunks: 'all',
      cacheGroups: {
        vendors: {
          name: 'chunk-vendors',
          test: /[\\/]node_modules[\\/]/,
          priority: 10,
          reuseExistingChunk: true,
        },
        react: {
          name: 'chunk-react',
          test: /[\\/]node_modules[\\/]react(.*)/,
          priority: 20,
          reuseExistingChunk: true,
        }
      }
    }
  }
}
